|
ARTeam Tutorial Visit:
http://cracking.accessroot.com
|
http://forum.accessroot.com Derive 6.0 |
| Information | Manual unpacking of VBOX protector |
| Target | DERIVE 6.0 |
| Available | http://education.ti.com/us/product/software/derive/features/features.html |
| Tools | OllyDbg 1.10 |
| Protection | Trial 30 days |
| Level | Beginner |
| Category | Unpacking / Cracking |
| Author(s) | ThunderPwr September 2004 |
| Requirements | Windows 2K, XP, IE 5.5 and above for best viewing |
|
1. Introduction
|
|
|
| 2. What
we can do |
| Our purpose is manual unpack the program and defeat the trial time limit which is builded within VBOX packer. |
|
STEP 1 – Executable file analysis
after installation
|
|
This
file was packed with VBOX protector, a confirm about packer can
be obtained executing original program, look on the bottom left
corner and you can see the VBOX icon which tell us about the protector:
|
|
STEP 2 – Manual unpacking
|
|
OllyDbg
tell us about some packing code, press OK button to continue:
Press
F9 in order to run the executable, OllyDbg now break due to INT3 instruction:
Press SHIFT+F7 to skip the exception, press F9 to run the program, you get another exception:
Skip
again the exception with SHIFT+F7 and press F9 to run the program,
OllyDbg show this message:
press
OK to continue, there are a nag message from VBOX protector about
debugger relevation:
when
you press OK button program stop then you've
to restart OllyDbg and activate the IsDebuggerPresent plugin in order
to hide the debugger:
Press
F9 to run the program, skip all the exception with SHIFT+F7/F9 and
now you’re able to reach the main window of the program, you can look
the message at the bottom of the window about the time of the evaluation
remaining:
Now
press the Try button on the main program window, there is another
INT 3 break, press SHIFT+F7 to skip the exception, now if you press
F9 program start:
Ok,
program is started this means which is already unpacked in memory,
then restart OllyDbg and repeat all step until you reach the last
exception after you press the Try button, remember also to activate
the IsDebuggerPresent plugin.
Now
go to the 00401000 Address which is the section CODE and put on it
a memory breakpoint on access:
Return on OllyDbg code window and press SHIFT+F9, now you must begins to have more stop from memory breakpoint when writing to [……..] where the address reside on section CODE, take a look on the code window:
This
break is due to the REP MOVS instruction which write into section
CODE, to skip in a faster way this cycle you have to place a breakpoint
on the next JMP instruction and skip all REP MOVS instruction with
F9.
Press
the Finish button to start the process, after some file loading a
new message box arise:
press
F9, OllyDbg stop on our JMP breakpoint, now you must restore the breakpoint
on memory access on the section CODE and remove the last breakpoint
on the JMP instruction (press F2), press F9 to run the program, OllyDbg
stop again into memory breakpoint then you must remove the breakpoint
on the section CODE and place a breakpoint on the PUSH 1 instruction
which is after the JL conditional jump:
run
again the program (F9) and after some time OllyDbg stop on your breakpoint.
To
show the code put the cursor on 004A32C8 and press CTRL+A to force
OllyDbg to re-analise the code:
Now
we have reach the OEP and is time to dump the program using the OllyDump
plugin, be care of all your dump option is equal with all reported
below:
OEP = Real_Entry_Point - Image_Base = 004A32C8 –
00400000 = 00A32C8
press the Dump button to write the process
memory on your hard-disk, about this you can choose a dumped.exe name
(file size is approximately three time more large than the original
executable).
To
load the dumped file into PEditor just press the browse
button and go to the directory where the dumped file reside:
Press
the sections button which is into the Tables
frame:
How
you can see the Virtual size (VS) is equal for each section with Raw
Size (RS), and Virtual Offset (VO) is equal to the Raw Offset (RO)
then step through the PEditor is not necessary.
You can rebuild the IAT avoiding the encryption which is made from the packer, to do this restart OllyDbg (press CTRL+F2) and set the IsDebuggerPresent plugin, run the program with F9. Skip all the exception with SHIFT+F7 and SHIFT+F9 until you reach the main window with the day evaluation remaining (fig. 10). Press
ALT+E to show the executable module:
Double-click
on the vboxt430.dll module:
Now
is time to search the "magic jump", with this you’re able
to avoid the IAT encryption and then keep the right IAT with ImpREC
in order to rebuid the dumped file to work perfectly; to do this press
CTRL+G and then write 0700BB52 (this place is easily to find, just
trace with F8 into vboxt430.dll and see for API name, there are some
API which jump is taken and other about no jump is taken, instead
the right address there are a redirection into VBOX module, a general
approach can be follow the redirection to find the right API and write
it into the IAT, this approach is much similar to one used in ASProtect
to rebuild the IAT bad entry, more general but can take some time
than the method of magic jump which is reported below):
press
OK button to land on this piece of code:
With
this jump you can avoid the IAT encryption, to do this you have to
place a memory breakpoint on access on this address:
Press
the try button on the program main window and OllyDbg stop on the
vboxt430 module, press F9 and skip all the exception and memory breakpoint
until you reach the JE location, then try to change this conditional
jump with a JMP instruction (press space and write JMP instead of
JE). If you have trouble to reach the JE location due to the VBOX
debugger relevation before this point you have to restart the process
again:
When
you have reached the JE instruction and changed this into JMP instruction
press CTRL+G and write 004A32C8 (this is the real OEP which we’ve
finded in our previous analysis) then place another breakpoint on
memory access on this address.
Press
F9 (this rebuild the IAT before jump to the real OEP), when rebuiding
process is finished OllyDbg must stop in our OEP. When OllyDbg stop
the IAT is still rebuilded in memory and all entry is valid, hence
start ImpREC and choose the derive6.exe process.
All
entry are still valid and you can rebuild the IAT in your dumped file,
to do this press Fix Dump button and choose
the dumped.exe file to rebuild it (ImpREC now save a new file namely
dumped_.exe):
Now
check if your fixed dumped executable work, rename the file dumped_.exe
in Derive6.exe and launch it, well it’s working now and we don’t have
any nag screen about VBOX and trial time limitation. Work done!
|
|
3. Conclusion
|
|
|
|
8. Greetingz
|
|
[MAIN TEAM]
|